﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/Management.Master" AutoEventWireup="true"
    CodeBehind="Product.aspx.cs" Inherits="WanPiJie.WebSite.Management.ProductPage" %>

<%@ Import Namespace="WanPiJie" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        添加商品</div>
    <ul>
    <li>
    名称：<input type="text" name="pname" />
    </li>
        <%foreach (Int16 key in this.DicAttributes.Keys)
          {%>
        <li>
            <%=this.DicAttributes[key]%>：
            <input type="text" name="attributes-<%=key%>" />
        </li>
        <%} %>
    </ul>
    <input type="submit" value="添加" />
    <h3>
        商品列表</h3>
    <div>
        <div>
            <span><strong>名称 </strong></span>
            <%foreach (Int16 key in this.DicAttributes.Keys)
              {%>
            <span><strong>
                <%=this.DicAttributes[key]%>
            </strong></span>
            <%}%>
        </div>
        <div>
            <%foreach (var product in this.Products)
              { %>
            <div>
                <span>
                    <%=product.Name %>
                </span>
                <%foreach (Int16 key in this.DicAttributes.Keys)
                  {%>
                <span>
                    <%=product.Attributes[key] %>
                </span>
                <%} %>
            </div>
            <%} %>
        </div>
    </div>
    <input type="hidden" name="catalogId" value='<%=QV("cg")%>' />
</asp:Content>
